package com.andreas.serviceImp;

import com.andreas.mapper.DetailMapper;
import com.andreas.pojo.Book;
import com.andreas.service.DetailService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Author andreaszhou
 * @ClassName DetailServiceImpl
 * @Description TODO
 * @date 2021/1/20 17:12
 * @Version 1.0
 */
@Service
@Transactional(propagation = Propagation.NOT_SUPPORTED,readOnly = true)
public class DetailServiceImpl implements DetailService {
    @Resource
    private DetailMapper detailMapper;
    @Override
    public Book showBookDetailService(int bookId) {
        Book book = detailMapper.selectById(bookId);
        return book;
    }
}
